package com.zhou.basics.business.brand;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zhou.basics.common.core.ResultPage;
import com.zhou.basics.dao.BrandMapper;
import com.zhou.basics.model.goods.Brand;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @ProjectName: tsqingcheng
 * @ClassName: BrandServiceImpl
 * @Time: 2020/2/28
 * @Author: zhou24
 * @Description:
 * @Experience:
 */
@Service
public class BrandServiceImpl implements BrandService {

    @Resource
    private BrandMapper brandMapper;

    @Override
    public List<Brand> queryAll() {
        List<Brand> list = brandMapper.selectAll();
        if (null==list){
            return new ArrayList<>();
        }
        return list;
    }

    @Override
    public Page<Brand> queryPage() {
        return (Page<Brand>) brandMapper.selectAll();
    }
}
